package com.example.admin.myapplication.presenter;

import android.view.animation.AlphaAnimation;

import com.example.admin.myapplication.BaseView;
import com.example.admin.myapplication.component.DaggerMainComponent;
import com.example.admin.myapplication.component.MainComponent;
import com.example.admin.myapplication.modul.MainAnimationModule;
import com.example.admin.myapplication.view.IMainView;

import javax.inject.Inject;

/**
 * Created by admin on 2016/4/28.
 */
public class MainPresenter implements IBasePresenter {

    private IMainView iMainView;

    private MainComponent mainComponent;

    @Inject
    AlphaAnimation alphaAnimation;

    public MainPresenter(BaseView BaseView){
        this.iMainView = (IMainView) BaseView;
        mainComponent =  DaggerMainComponent.builder().mainAnimationModule(new MainAnimationModule(5000,0.1f,1f)).build();
        mainComponent.inject(this);
        iMainView.startAnimation(alphaAnimation);
    }
}
